package com.hrb.douban.activtity.setting;

import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.View;

import com.bumptech.glide.Glide;
import com.github.chrisbanes.photoview.PhotoView;
import com.hrb.douban.CustomApplication;
import com.hrb.douban.R;
import com.hrb.douban.activtity.base.BaseActivity;
import com.hrb.douban.mview.CustomTitleBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CheckLargeImageActivity extends BaseActivity implements View.OnClickListener {

    @BindView(R.id.custom_title_bar)
    CustomTitleBar customTitleBar;
    @BindView(R.id.big_image)
    PhotoView bigImage;
//    @BindView(R.id.id_large_Image_view)
//    LargeImageView mLargeImageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_check_large_image);
        ButterKnife.bind(this);
        customTitleBar.getMtitle().setText(getIntent().getStringExtra("title"));
        customTitleBar.setTitleClickListener(this);
        try {
            Glide.with(getApplicationContext()).load("https://picsum.photos/1920/1080").centerCrop().into(bigImage);
                    //Glide.with(CustomApplication.getContext()).load(directorRecord.getAvatars()).override(270, 383).centerCrop().into(viewHolder.itemDirectorImg);
            //bigImage.setImageResource(R.drawable.large);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.title_bar_left:
                finish();
                break;
            case R.id.title_bar_right:
                break;
        }
    }
}
